package com.sys.controller;

import com.sys.common.util.ResponseDateUtil;
import com.sys.common.util.ResultBuilder;
import com.sys.pojo.Chanage;
import com.sys.service.ChanageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ZJF
 * @since 2021-04-01
 */
@Api(tags = {"人事变动"})
@RestController
@RequestMapping("/chanage")
public class ChanageController {

    @Autowired
    private ChanageService chanageService;

    @PostMapping("/listAllChanage")
    @RequiresPermissions("chanage:list")
    @ApiOperation("获取人事变动情况")
    public ResponseDateUtil getAllChanage(@RequestBody Chanage chanage) {
        return ResultBuilder.success(chanageService.findListByPage(chanage));
    }

}
